using System;
using System.Collections.Generic;
namespace AppToolKit.Model.Validation
{
	public class ValidatorQueue
	{
		private Dictionary<string, List<IValidator>> queue_;
		public Dictionary<string, List<IValidator>> Queue
		{
			get
			{
				if (this.queue_ == null)
				{
					this.queue_ = new Dictionary<string, List<IValidator>>();
				}
				return this.queue_;
			}
			set
			{
				this.queue_ = value;
			}
		}
		public List<IValidator>this[string property]
		{
			get
			{
				return this.Queue[property];
			}
		}
		public string[] GetProperies()
		{
			string[] array = new string[this.Queue.Keys.Count];
			this.Queue.Keys.CopyTo(array, 0);
			return array;
		}
		public void Add(string prop, IValidator validator)
		{
			if (!this.Queue.ContainsKey(prop))
			{
				this.Queue[prop] = new List<IValidator>();
			}
			this.Queue[prop].Add(validator);
		}
	}
}
